package cn.yeziji.forum.common.enums.status;

import cn.yeziji.forum.common.enums.status.code.UserCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 用户状态码
 *
 * @author gzkemays
 * @since 2022/3/23 10:20
 */
@Getter
@AllArgsConstructor
public enum UserStatus {
  /** 用户统一枚举状态码 */
  USER_IS_NOT_FOUND(UserCode.NOT_FOUND, "用户不存在"),
  USER_EMAIL_SEND_FAIL(UserCode.USER_EMAIL_SEND_FAIL, "发送用户邮件失败"),
  USER_EMAIL_FORMAT_ERROR(UserCode.USER_EMAIL_FORMAT_ERROR, "用户邮箱格式有误"),
  USER_EMAIL_IS_NOT_ONLY(UserCode.USER_EMAIL_IS_NOT_ONLY, "电子邮箱已被注册"),
  EMAIL_CODE_IS_EXPIRED(UserCode.EMAIL_CODE_IS_EXPIRED, "邮箱验证码已过期"),
  EMAIL_CODE_IS_MISTAKE(UserCode.EMAIL_CODE_IS_MISTAKE, "邮箱验证码错误"),
  TIME_STAMP_IS_MISTAKE(UserCode.TIME_STAMP_IS_MISTAKE, "错误的时间戳"),
  EMAIL_IS_NULL(UserCode.EMAIL_IS_NULL, "邮箱不能为空"),
  EMAIL_CODE_IS_FAST(UserCode.EMAIL_CODE_IS_FAST, "获取过于频繁，请耐心等待。"),
  USER_NAME_IS_SHORT(UserCode.USER_NAME_SHORT, "用户名过短"),
  USER_NAME_IS_TO_LONG(UserCode.USER_NAME_LONG, "用户名过长"),
  USER_AVATAR_TYPE_MISMATCH(UserCode.USER_AVATAR_TYPE_MISMATCH, "用户上传头像类型不支持"),
  NON_ONE_NICK_NAME(UserCode.NON_ONE_NICK_NAME, "昵称不唯一"),
  USER_PASSWORD_IS_SHORT(UserCode.USER_PASSWORD_SHORT, "用户密码过短"),
  USER_NAME_RE_REG(UserCode.USER_NAME_RE_REG, "用户名已被使用"),
  USER_PASSWORD_IS_DIFFERENT(UserCode.USER_PASSWORD_IS_DIFFERENT, "密码不一致"),
  PASSWORD_ERROR(UserCode.PASSWORD_ERROR, "用户密码错误"),
  USER_UPDATE_LOCK(UserCode.USER_UPDATE_LOCK, "暂时无法更新用户信息"),
  USER_DATA_EXCEPTION(UserCode.USER_DATA_EXCEPTION, "用户数据异常");
  int code;
  String msg;
}
